package com.zit.util;

import java.util.List;

public class PageUtil {

	//每页记录数
	private static final int pageSize = 10 ;
	
	//当前页数
	private int page ;
	
	//总记录数
	private int totalCount ;
	
	//总页数
	private int totalPage ;
	
	//开始记录数
	private int start ;
	
	private List list ;
	
	public PageUtil(){
		this.page = 1 ;
	}
	
	public static int getPagesize() {
		return pageSize;
	}


	public int getPage() {
		return page;
	}


	public void setPage(int page) {
		this.page = page;
	}


	public int getTotalCount() {
		return totalCount;
	}


	public void setTotalCount(int totalCount) {
		this.totalCount = totalCount;
		this.totalPage = (totalCount-1)/pageSize+1;
	}


	public int getTotalPage() {
		return totalPage;
	}

	public int getStart() {
		return (this.page-1)*pageSize;
	}

	public List getList() {
		return list;
	}

	public void setList(List list) {
		this.list = list;
	}
	
	
}
